<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        你的问题是：<input type="text" v-model="message">
    </div>
    <script src="../../js/vue.js"></script>
    <script>
        const dcl = {
            data() {
                return {
                    message: 'hell world'
                }
            },
            watch: {
                message(newValue, oldValue) {
                    console.log('新值：' + newValue, '旧值：' + oldValue)
                    this.queryAnswer()
                }
            },
            methods: {
                queryAnswer() {
                    console.log(`你的问题${this.message}嘿嘿嘿`)
                }
            }
        }
        Vue.createApp(dcl).mount('#app');
    </script>
</body>

</html>